﻿#include "../lv_Agriculture.h"

lv_obj_t *create_srceen(void)
{
    lv_obj_t *Screen = lv_obj_create(NULL);
    lv_obj_add_style(Screen, &lv_Clean_Style, LV_STATE_DEFAULT);
    lv_obj_clear_flag(Screen, LV_OBJ_FLAG_SCROLLABLE);
    lv_obj_set_size(Screen, 320, 240);
    return Screen;
}

void lv_Top_StateBar(lv_obj_t *parent)
{
    lv_obj_t *StateBar = lv_obj_create(parent);
    lv_obj_set_align(StateBar, LV_ALIGN_TOP_MID);
    lv_obj_add_style(StateBar, &lv_Clean_Style, LV_STATE_DEFAULT);
    lv_obj_set_style_border_side(StateBar, LV_BORDER_SIDE_BOTTOM, LV_STATE_DEFAULT);
    lv_obj_set_size(StateBar, lv_pct(100), lv_pct(15));

    lv_obj_t *Time = lv_label_create(StateBar);
    lv_obj_set_size(Time, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
    lv_obj_set_align(Time, LV_ALIGN_LEFT_MID);
    lv_label_set_text(Time, "11-27 10:27");
}

lv_obj_t *create_btn(lv_obj_t *parent, const char *text)
{
    lv_obj_t *btn = lv_btn_create(parent);
    lv_obj_t *label = lv_label_create(btn);
    lv_label_set_text(label, text);
    return btn;
}
